package com.example.lib_core.api;

import androidx.lifecycle.LiveData;

import com.example.lib_core.bean.FoodBean;
import com.example.lib_core.bean.HeadlinesBean;
import com.example.lib_core.bean.NewsListBean;
import com.example.lib_core.bean.NewsTypeBean;
import com.fhz.utilsfhz.ApiResponse;

import java.util.List;

import retrofit2.http.GET;
import retrofit2.http.Query;

public interface Api {
    @GET("api/GoodsType/getRecommendTypes")
    LiveData<ApiResponse<List<FoodBean>>> getFoodBean();

    @GET("api/NewsType/getAllTypes")
    LiveData<ApiResponse<List<NewsTypeBean>>> getNewTypeBean();

    @GET("api/News/getNews?newstype=1&pagenum=1&pagesize=10")
    LiveData<ApiResponse<List<NewsListBean>>> getNewListBean();

    @GET("api/News/getNews?")
    LiveData<ApiResponse<List<HeadlinesBean>>> getHeadLinesBean(@Query("newstype") int newstype,@Query("pagenum") int pagenum,@Query("pagesize") int pagesize);
}
